package com.sos.widget.view.refresh;

import android.content.Context;
import android.util.AttributeSet;

import com.scwang.smart.refresh.footer.ClassicsFooter;
import com.scwang.smart.refresh.header.MaterialHeader;
import com.scwang.smart.refresh.layout.SmartRefreshLayout;
import com.scwang.smart.refresh.layout.constant.SpinnerStyle;
import com.sos.widget.R;

/**
 * 脉冲
 */
public class ThemeMaterialRefreshLayout extends SmartRefreshLayout {
    public ThemeMaterialRefreshLayout(Context context) {
        super(context);
    }

    public ThemeMaterialRefreshLayout(Context context, AttributeSet attrs) {
        super(context, attrs);
        initView(attrs);
    }

    public void initView(AttributeSet attrs) {

        setRefreshHeader(new MaterialHeader(getContext()).
                setColorSchemeColors(ThemeClassicsRefreshLayout.themeColor));

        setRefreshFooter(new ClassicsFooter(getContext()).
                setSpinnerStyle(SpinnerStyle.FixedBehind).
                setPrimaryColorId(R.color.c_f6f6f6).
                setAccentColor(ThemeClassicsRefreshLayout.themeColor));
    }
}
